<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>修改医生页面</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}" />
    <link rel="stylesheet" th:href="@{/css/style1.css}" />
    <link rel="stylesheet" th:href="@{/css/style.css}" />
</head>
<style>
    label{
        text-align: center;
    }
    .form-group{
        margin-bottom: 10px;
    }
</style>
<body>
<div th:include="admin/header1"></div>
<main id="main">
    <section class="breadcrumbs">
        <div class="container">
            <div class="d-flex justify-content-between align-items-center">
                <ol>
                    <li><a href="#">首页</a></li>
                    <li><a href="#">编辑医生信息</a></li>
                </ol>
            </div>
        </div>
    </section>
<section class="inner-page">
<div class="container">
    <div class="card">
        <div class="card-header">
            <h3 class="card-title mb-1">修改医生信息</h3>
        </div>
        <div class="card-body">
            <a th:href="@{/doctor/selectAllDoctorsByPage?currentPage=1}" class="btn btn-success float-right  "
               style="font-size: 10px;width: 50px; margin: 10px;">返回</a>
            <form th:action="@{/doctor/update}"
                  name="myform" method="post"
                  th:object="${doctor}"
                  class="form-horizontal"
                  enctype="multipart/form-data">
                <div class="form-group d-flex">
                    <label class="col-sm-2 col-md-2 control-label">医&nbsp;生&nbsp;名&nbsp;字:</label>
                    <div class="col-sm-4 col-md-4">
                        <input type="text" class="form-control"
                               placeholder="请输入医生名字"
                               th:field="*{name}"/>
                        <input type="hidden" name="id" id="id" th:value="${doctor.id}"/>
                    </div>
                    <label class="col-sm-2 col-md-2 control-label">医&nbsp;生&nbsp;电&nbsp;话:</label>
                    <div class="col-sm-4 col-md-4">
                        <input type="text" class="form-control"
                               placeholder="请输入电话"
                               th:field="*{phone}"/>
                    </div>
                </div>
                <div class="form-group d-flex">
                    <label class="col-sm-2 col-md-2 control-label">医&nbsp;生&nbsp;密&nbsp;码:</label>
                    <div class="col-sm-4 col-md-4">
                        <input type="text" class="form-control"
                               placeholder="请输入医生密码"
                               th:field="*{pwd}"/>
                    </div>
                    <label class="col-sm-2 col-md-2 control-label">医&nbsp;生&nbsp;职&nbsp;称:</label>
                    <div class="col-sm-4 col-md-4">
                        <input type="text" class="form-control"
                               placeholder="请输入医生职称"
                               th:field="*{job}"/>
                    </div>
                </div>
                <div class="form-group d-flex">
                    <label class="col-sm-2 col-md-2 control-label">医&nbsp;生&nbsp;详&nbsp;情:</label>
                    <div class="col-sm-4 col-md-4">
                        <input type="text" class="form-control"
                               placeholder="请输入医生详情"
                               th:field="*{note}"/>
                    </div>
                    <label class="col-sm-2 col-md-2 control-label">医生挂号费:</label>
                    <div class="col-sm-4 col-md-4">
                        <input type="number" class="form-control"
                               placeholder="请输入医生挂号费"
                               th:field="*{fee}"/>
                    </div>
                </div>
                <div class="form-group d-flex">
                    <label class="col-sm-2 col-md-2 control-label">医&nbsp;生&nbsp;头&nbsp;像:</label>
                    <div class="col-sm-4 col-md-4">
                        <input type="file" placeholder="请选择图片" class="form-control" name="fileName"/>
                        <img th:src="${doctor.tx}"
                             style="height: 50px; width: 50px; display: block;"/>
                        <input type="hidden" name="tx" id="tx" th:value="${doctor.tx}"/>
                    </div>
                    <label class="col-sm-2 col-md-2 control-label">科&nbsp;室&nbsp;名&nbsp;称:</label>
                    <div class="col-sm-4 col-md-4">
                        <select class="form-control" th:field="*{dId}">
                            <option th:each="dp:${departments}" th:value="${dp.id}" th:text="${dp.dName}"></option>
                        </select>
                    </div>
                </div>
                <div class="form-group text-center">
                        <button type="submit" class="btn">修改</button>
                        <button type="reset" class="btn1 btn">重置</button>
                </div>
            </form>
        </div>
    </div>
</div>
    </section>
</main>
</body>
</html>